﻿@model SimplCommerce.Module.Orders.ViewModels.CartViewModel

<h3>@Localizer["Order summary"] (@Model.CartItems.Count() @Localizer["products"]) </h3>
<table class="table table-striped">
    <tr>
        <th>@Localizer["Product"]</th>
        <th class="text-center">@Localizer["Quantity"]</th>
        <th class="text-right">@Localizer["Price"]</th>
    </tr>
    @foreach (var item in Model.CartItems)
    {
        <tr>
            <td>
                @item.ProductName
                @if (item.VariationOptions.Any())
                {
                    <ul class="list-unstyled">
                        @foreach (var attr in item.VariationOptions)
                        {
                            <li><span>@attr.OptionName:</span> @attr.Value</li>
                        }
                    </ul>
                }
            </td>
            <td class="text-center">@item.Quantity</td>
            <td class="text-right">@item.ProductPriceString</td>
        </tr>
    }
    <tr>
        <td><strong>@Localizer["Subtotal"]</strong></td>
        <td colspan="2" class="text-right"><strong>@Model.SubTotal</strong></td>
    </tr>
</table>